package com.dxy.yesas2020goals.study.partone.disignpattern.reposibilitypattern.withbuilder;

import org.apache.commons.lang3.StringUtils;

/**
 * @author victorydeng
 * @Classname ValidateHandler
 * @Description TODO
 * @Date 2020/5/13 10:11
 * @Created by victorydeng
 */
public class ValidateHandler extends Handler {
    @Override
    void doHandler(Member member) {
        if(StringUtils.isBlank(member.getUsername())|| StringUtils.isBlank(member.getPassword())) {
            System.out.println("用户名或密码不能为空");
            return;
        }
        System.out.println("用户名和密码不为空，可以往下执行");
        next.doHandler(member);
    }
}
